import http from "./http.js";
import config from "@/config/index.config.js";





// 发送验证码
export const sendCodeApi = (data) => http.GET(`${config.baseUrl}/miou/login/telVerify`, data);
// 登录
export const loginApi = (data) => http.GET(`${config.baseUrl}/miou/login/telLogin`, data);
// 获取Openid
export const openidAPI = (data) => http.GET(`${config.baseUrl}/HtmlPay/appletpay/getopenid`, data);


// 获取个人信息
export const getUserApi = (data) => http.GET(`${config.baseUrl}/miou/cusInfo/getUserinfo`, data);

export const localtLogin = (data) => http.GET(`${config.baseUrl}/miou/peoplenear/localtLogin`, data, {noToast: true});


// 修改个人信息
export const setUserApi = (data) => http.GET(`${config.baseUrl}/miou/cusInfo/updCustInfo`, data);
// 个人信息标签
export const userTagApi = (data) => http.GET(`${config.baseUrl}/miou/portrait/getAllTag`, data);
// 个人游戏
export const mineGame = (data) => http.GET(`${config.baseUrl}/miou/gameinfo/mineGame`, data, {noToast: true});

// 个人积分
export const userAccountApi = (data) => http.GET(`${config.baseUrl}/MiouPay/pay/payaccount`, data);

// 钻石流水表
export const userDiamondApi = (data) => http.GET(`${config.baseUrl}/MiouPay/pay/selectpaydiamondtrans`, data);
// 米豆流水表
export const userBeanApi = (data) => http.GET(`${config.baseUrl}/MiouPay/pay/selectpaybeantrans`, data);

// 免费活动报名
export const userEntryfee = (data) => http.GET(`${config.baseUrl}/MiouPay/pay/entryfee`, data);

// 活动报名支付
export const userEntryCreat = (data) => http.GET(`${config.baseUrl}/HtmlPay/appletpay/creataplyorder`, data);

// 商家联盟
export const shopAlliance = (data) => http.GET(`${config.baseUrl}/HtmlPay/shop/getShopkeeperalliance`, data);
// 商家联盟支付
export const shopAlliancePay = (data) => http.POST(`${config.baseUrl}/HtmlPay/grouppurchasepay/creatorder`, data);




// 剧本热门搜索
export const hotSearch = (data) => http.GET(`${config.baseUrl}/miou/search/hotSearch`, data);
// 剧本搜索
export const secnSearch = (data) => http.GET(`${config.baseUrl}/miou/search/scriptRanking`, data);
// 剧本搜索过滤
export const secnSearchConfig = () => http.GET(`${config.baseUrl}/miou/search/queryTscsconfig`);
// 活动热门搜索
export const hotSearchGame = (data) => http.GET(`${config.baseUrl}/miou/gameinfo/hotSearch`, data);
// 活动热门搜索
export const hotSearchIdle = (data) => http.GET(`${config.baseUrl}/miou/goods/hotSecondsCriptSearch`, data);
// 店铺搜索
export const shopSearch = (data) => http.GET(`${config.baseUrl}/miou/gameinfo/getactivitysearch`, data);
// 闲本搜索
export const idleSearch = (data) => http.GET(`${config.baseUrl}/miou/goods/searchidle`, data);


// 首页banner
export const homeBanner = (data) => http.GET(`${config.baseUrl}/miou/miouImage/getImageListByType`, data);
// 首页广告
export const homeAdvert = (data) => http.GET(`${config.baseUrl}/api/bannerList`, data);


// 本周剧本推荐
export const weekCommend = (data) => http.GET(`${config.baseUrl}/miou/search/weekcommended`, data);
// 达人推荐
export const expertCommend = (data) => http.GET(`${config.baseUrl}/miou/commdyamic/getRecommendExpert`, data, {noToast: true});
// 行业资讯
export const articleCommend = (data) => http.GET(`${config.baseUrl}/miou/article/ngcList`, data);
// 找剧本
export const findScen = (data) => http.GET(`${config.baseUrl}/miou/search/queryScenList`, data);


// 社区信息列表
export const getCommunity = (data) => http.GET(`${config.baseUrl}/miou/commdyamic/getDYamicList`, data);
// 社区信息详情
export const getCommunityDetail = (data) => http.GET(`${config.baseUrl}/miou/commdyamic/getDYamicDetail`, data);
// 社区信息详情评论列表
export const getCommunityCommit = (data) => http.GET(`${config.baseUrl}/miou/commdyamic/getDYrepDetail`, data);
// 社区信息详情评论全部回复
export const getCommunityReplyList = (data) => http.GET(`${config.baseUrl}/miou/commdyamic/getDYcommDetail`, data);
// 社区信息详情评论点赞
export const onLikeCommunity = (data) => http.GET(`${config.baseUrl}/miou/commdyamic/getLike`, data);
// 社区信息详情评论取消点赞
export const cancelLikeCommunity = (data) => http.GET(`${config.baseUrl}/miou/commdyamic/cancelLike`, data);
// 社区信息详情评论提交
export const submitCommunity = (data) => http.GET(`${config.baseUrl}/miou/commdyamic/commDyText`, data);
// 社区信息详情评论回复提交
export const submitReplyText = (data) => http.GET(`${config.baseUrl}/miou/commdyamic/replyDyText`, data);


// 收藏商户
export const collectShop = (data) => http.GET(`${config.baseUrl}/miou/collect/collectShop`, data);
// 取消收藏商户
export const cancelColShop = (data) => http.GET(`${config.baseUrl}/miou/collect/cancelColShop`, data);


// 展会信息
export const getExhibition = (data) => http.GET(`${config.baseUrl}/miou/miouImage/GetExhibition`, data);
// 剧本排行
export const scenListByRank = (data) => http.GET(`${config.baseUrl}/miou/search/scriptRanking`, data);
// 发行列表
export const publisherList = (data) => http.GET(`${config.baseUrl}/miou/commdyamic/getDistributionlist`, data);
// 发行详情
export const publisherDetails = (data) => http.GET(`${config.baseUrl}/miou/commdyamic/getDistributionlistinfo`, data);
// 剧本详情
export const scenDetails = (data) => http.GET(`${config.baseUrl}/miou/commdyamic/getScenariodetails`, data);
// 剧本评论列表
export const scenComments = (data) => http.GET(`${config.baseUrl}/miou/commdyamic/reviewClassify`, data);

// 活动游戏列表
export const gameNewList = (data) => http.GET(`${config.baseUrl}/miou/gameinfo/NewGameList`, data);
// 活动商家列表
export const gameShopList = (data) => http.GET(`${config.baseUrl}/miou/gameinfo/getshopList`, data);
// 活动商家详情
export const getShopDetail = (data) => http.GET(`${config.baseUrl}/miou/gameinfo/getshopDetail`, data);
// 活动详情
export const getEventDetails = (data) => http.GET(`${config.baseUrl}/miou/gameinfo/EventDetails`, data);
// 活动详情图片
export const getEventDetailImgs = (data) => http.GET(`${config.baseUrl}/miou/gameinfo/getGameDetailImgForHtml`, data);
// 活动报名列表
export const getSignGameList = (data) => http.GET(`${config.baseUrl}/miou/gameinfo/getSignGameList`, data);


// 判断活动是否收藏
export const isCollectGame = (data) => http.GET(`${config.baseUrl}/miou/collect/isCollectGame`, data);
// 收藏活动
export const collectGame = (data) => http.GET(`${config.baseUrl}/miou/collect/collectGame`, data);
// 取消收藏活动
export const cancelColGame = (data) => http.GET(`${config.baseUrl}/miou/collect/cancelColGame`, data);
// 我的活动列表
export const myActivity = (data) => http.GET(`${config.baseUrl}/miou/activity/myActivity`, data);
// 我的历史活动列表
export const myActivityhis = (data) => http.GET(`${config.baseUrl}/miou/activity/myActivityhis`, data);
// 我的粉丝列表
export const myAllFans = (data) => http.GET(`${config.baseUrl}/miou/Tcuattention/getMyTcuattentionFansAll`, data);
// 关注粉丝
export const addFans = (data) => http.GET(`${config.baseUrl}/miou/Tcuattention/addTcuattention`, data);
// 取消关注粉丝
export const delFans = (data) => http.GET(`${config.baseUrl}/miou/Tcuattention/delTcuattention`, data);
// 我的关注
export const myFocusList = (data) => http.GET(`${config.baseUrl}/miou/commdyamic/UserFocusList`, data);

// 获取其他用户信息
export const getOtherApi = (data) => http.GET(`${config.baseUrl}/miou/commdyamic/UserinfoDetails`, data);
// 获取其他用户动态
export const getPayerDy = (data) => http.GET(`${config.baseUrl}/miou/commdyamic/PersonalDyList`, data);
// 获取其他用户剧本
export const getPayerScen = (data) => http.GET(`${config.baseUrl}/miou/commdyamic/LssOrderScen`, data);
// 获取其他用户打卡列表
export const getUserClock = (data) => http.GET(`${config.baseUrl}/miou/commdyamic/getUserClock`, data);







// 发布闲本
export const issuerIdle = (data) => http.POST(`${config.baseUrl}/miou/goods/createcommodity`, data);
// 闲本列表
export const getLeisurelyList = (data) => http.GET(`${config.baseUrl}/miou/goods/secondscriptlist`, data);
// 用户闲本列表
export const userLeisurelyList = (data) => http.GET(`${config.baseUrl}/miou/goods/sparepersonal`, data);
// 闲本详情
export const getLeisurelyInfo = (data) => http.GET(`${config.baseUrl}/miou/goods/secondscriptinfo`, data);
// 闲本详情
export const getLeisurelyImgs = (data) => http.GET(`${config.baseUrl}/miou/goods/getScriptinfoImgForHtml`, data);



// 收货地址列表
export const addressList = (data) => http.GET(`${config.baseUrl}/miou/goods/addresselist`, data);
// 收货人的默认地址
export const defaultAddress = (data) => http.GET(`${config.baseUrl}/miou/goods/defaultaddress`, data);
// 添加收货地址
export const createAddress = (data) => http.POST(`${config.baseUrl}/miou/goods/createaddress`, data);
// 编辑收货地址
export const editAddress = (data) => http.POST(`${config.baseUrl}/miou/goods/addressedit`, data);
// 查看收货地址
export const queryAddress = (data) => http.GET(`${config.baseUrl}/miou/goods/addresseditinfo`, data);
// 查看收货地址
export const delAddress = (data) => http.GET(`${config.baseUrl}/miou/goods/ddrescancel`, data);

// 闲本下单
export const creatIdleOrder = (data) => http.GET(`${config.baseUrl}/MiouPay/createfreeorder/creatspareorder`, data);
// 小程序支付
export const wxPay = (data) => http.GET(`${config.baseUrl}/HtmlPay/wechatsparepay/creatspareorder`, data);

// 我发布的闲本
export const myReleaseIdleOrder = (data) => http.GET(`${config.baseUrl}/miou/goods/myrelease`, data);
// 我卖出的闲本
export const mySellIdleOrder = (data) => http.GET(`${config.baseUrl}/miou/goods/mysell`, data);
// 我买到的闲本
export const myBuyIdleOrder = (data) => http.GET(`${config.baseUrl}/miou/goods/myorder`, data);
// 闲本订单详情
export const idleOrderDetails = (data) => http.GET(`${config.baseUrl}/miou/goods/myorderdetails`, data);
// 闲本下架
export const idleOffshelve = (data) => http.GET(`${config.baseUrl}/miou/goods/offshelve`, data);
// 闲本确认发货
export const idleDelivery = (data) => http.GET(`${config.baseUrl}/miou/goods/confirmdelivery`, data);
// 闲本确认发货
export const idleReceipt = (data) => http.GET(`${config.baseUrl}/miou/goods/confirmreceipt`, data);
// 闲本刷新创建时间
export const idleRefreshTime = (data) => http.GET(`${config.baseUrl}/miou/goods/refresh`, data);

// 闲本银行卡添加
export const createBankcard = (data) => http.GET(`${config.baseUrl}/miou/goods/createbankcard`, data);
// 闲本银行卡修改
export const editBankcard = (data) => http.GET(`${config.baseUrl}/miou/goods/editbankcard`, data);
// 闲本支付宝账户添加
export const addAlipay = (data) => http.GET(`${config.baseUrl}/miou/goods/addalipay`, data);
// 闲本支付宝账户修改
export const editAlipay = (data) => http.GET(`${config.baseUrl}/miou/goods/editalipay`, data);
// 闲本支付宝默认账户
export const faultAccount = (data) => http.GET(`${config.baseUrl}/miou/goods/aldefaultaccount`, data);
// 闲本支付宝提现申请
export const withdrawal = (data) => http.GET(`${config.baseUrl}/miou/goods/withdrawal`, data);
// 闲本支付宝提现记录
export const withdrawalList = (data) => http.GET(`${config.baseUrl}/miou/goods/paymentrecords`, data);
// 退货原因下拉选
export const returnReason = (data) => http.GET(`${config.baseUrl}/miou/goods/returnReason`, data);
// 申请退款的提交
export const submitRefund = (data) => http.POST(`${config.baseUrl}/miou/goods/applyrefund`, data);
// 申请退款退货详情
export const returnDetails = (data) => http.GET(`${config.baseUrl}/miou/goods/returngoodsdetails`, data);
// 退货退款申请撤销
export const cancelRefund = (data) => http.GET(`${config.baseUrl}/miou/goods/applicationrevoked`, data);
// 同意退货退款申请
export const agreesRefund = (data) => http.GET(`${config.baseUrl}/miou/goods/agreesrefund`, data);
// 不同意退货退款
export const disagreeRefund = (data) => http.GET(`${config.baseUrl}/miou/goods/notagreerefund`, data);
// 拒绝退货原因
export const returnNotReason = (data) => http.GET(`${config.baseUrl}/miou/goods/reasonsrefusingrefund`, data);
// 拒绝退货
export const submitRefused = (data) => http.POST(`${config.baseUrl}/miou/goods/refusedrefund`, data);
// 支付宝退款
export const RefundAliPay = (data) => http.GET(`${config.baseUrl}/MiouPay/alipayrefund/aliPayRefundinfo`, data);
// 微信退款
export const RefundWX = (data) => http.GET(`${config.baseUrl}/MiouPay/wxrefund/refund`, data);
// 退货填写单号
export const refundDelivery = (data) => http.GET(`${config.baseUrl}/miou/goods/returnfillinginformation`, data);

